﻿using System;

namespace NetSync.Core
{
    /// <summary>
    /// DispatcherMessage
    /// </summary>
    public class DispatcherMessage
    {
        public DispatcherMessage(string topic, ReadOnlyMemory<byte> message, INetConnection netConnection)
        {
            Topic = topic;
            Message = message;
            NetConnection = netConnection;
        }

        public string Topic { get; }

        public ReadOnlyMemory<byte> Message { get; }

        public INetConnection NetConnection { get; }

        /// <summary>
        /// 数据是否被处理
        /// </summary>
        public bool IsHandled { get; set; }
    }
}
